package it.gat.client.view;

import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;

import it.gat.client.view.thread.GuiThread;
import it.gat.controller.utils.ImpostazioniDesktop;

import javax.swing.UIManager;

public class Main {

	/**
	 * @param args
	 */
	public static void main(String[] args) {

		try {

			UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());

			FileInputStream inputStream;
			inputStream = new FileInputStream("config.properties");
			ImpostazioniDesktop.load(inputStream);
		}catch (FileNotFoundException fileNotFoundEx)
		{
			try {
				ImpostazioniDesktop.saveDefault();
			} catch (IOException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			}

		}catch (Throwable e) {
			e.printStackTrace();
		}
		
		try
		{
			GuiThread guiThread = new GuiThread();
			guiThread.run();

		} 
		catch (Throwable e) {
			e.printStackTrace();
		}



	}

}
